package com.lengdanran.service;

import com.spring.Annotation.Autowired;
import com.spring.Annotation.Component;
import com.spring.Annotation.Scope;
import com.spring.Interface.BeanNameAware;

/**
 * @Classname UserService
 * @Description TODO
 * @Date 2021/6/27 23:15
 * @Created by ASUS
 */
@Component("userService")
@Scope("singleton")
public class UserService implements BeanNameAware {

    @Autowired
    private OrderService orderService;

    private String beanName;

    public void test() {
        System.out.println(orderService);
        System.out.println(beanName);
    }

    @Override
    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }
}
